mysql database cannot connect with cpanel [closed]
Posted
by
Rafee
on Pro Webmasters
See other posts from Pro Webmasters
or by Rafee
Published on 2011-11-18T12:24:28Z
Indexed on
2011/11/18
18:04 UTC
Read the original article
Hit count: 195
And this question was asked on http://stackoverflow.com/questions/8182119/mysql-database-cannot-connect-with-cpanel
<?php
$con1 = mysql_connect("mywebsiteip","mysql_username","mysql_user_password");
if(!$con1)
{
die ("Could not connect " . mysql_error());
}
else
{
echo "Good connection";
}
mysql_close($con1);
?>
When i run it, it cannot connect to mysql database over cpanel. and i even tried up
$con1 = mysql_connect("mywebsiteip:portnumber","mysql_username","mysql_user_password");
Can any let me know, which one is good way.
© Pro Webmasters or respective owner